package thinkinjava.c11_object;

import java.util.ArrayList;
import java.util.List;

public class WithoutGenerics {
    public static void main(String[] args) {
        List<Apple> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            list.add(new Apple());
        }

        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).id());
        }
    }
}


class Apple {
    private static long count;
    private final long id = count++;

    public long id() {
        return id;
    }
}

class Orange {
}